<template>
    <p ref="hello">compd</p>
    <p>{{ count }}</p>
    <button @click="count++">修改count</button>
</template>

<script setup>
import { ref } from 'vue';
import { onUpdated } from 'vue';
import { onMounted } from 'vue';


    const hello = ref(null)
   


    console.log('created......')

    onMounted(() => {
        console.log('mounted............')

        console.log(hello.value)
    })


    const count = ref(0)

    onUpdated(() => {
        console.log('updated...........')
    })

    const print = () => { 
        console.log(this) // undefined
        console.log(count)
    }
    print()



</script>

<style scoped>

</style>